/**
 * Please modify this class to meet your needs
 * This class is not complete
 */

package com.klikmee.sms.core.ws.mts.listener.subscription;

import java.util.Date;
import java.util.logging.Logger;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;

import com.klikmee.sms.core.ws.mts.listener.MTSCommunicator;

/**
 * This class was generated by Apache CXF 2.4.1 2011-08-24T10:55:31.483+02:00 Generated source version: 2.4.1
 * 
 */

@javax.jws.WebService(
						serviceName = "ProviderService",
						portName = "Provider",
						targetNamespace = "http://www.ericsson.com/wsdl/ts_sdp/provider/v1_0/service",
						/*wsdlLocation = "file:ts_sdp_provider_service_1_0.wsdl",*/
						endpointInterface = "com.klikmee.sms.core.ws.mts.listener.subscription.Provider")
public class ProviderImpl implements Provider {

	private MTSCommunicator	communicator	= null;

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.klikmee.sms.core.ws.mts.listener.subscription.Provider#receiveUnsubscription(java.lang.String msisdn ,)java.lang.String serviceId ,)java.lang.String distributionList )*
	 */
	public void receiveUnsubscription( java.lang.String msisdn, java.lang.String serviceId, java.lang.String distributionList ) throws PolicyException_Exception, ServiceException_Exception {
		communicator.receiveUnsubscription(msisdn, serviceId, distributionList);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.klikmee.sms.core.ws.mts.listener.subscription.Provider#getSubscriptionDetail(java.lang.String serviceId ,)java.lang.String message )*
	 */
	public com.klikmee.sms.core.ws.mts.listener.subscription.SubscriptionDetail getSubscriptionDetail( java.lang.String serviceId, java.lang.String message ) throws PolicyException_Exception,
			ServiceException_Exception {
		
		return communicator.getSubscriptionDetail(serviceId, message);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.klikmee.sms.core.ws.mts.listener.subscription.Provider#triggerService(java.lang.String serviceId ,)java.lang.String distributionList )*
	 */
	public void triggerService( java.lang.String serviceId, java.lang.String distributionList ) throws PolicyException_Exception, ServiceException_Exception {
		communicator.triggerService(serviceId, distributionList);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.klikmee.sms.core.ws.mts.listener.subscription.Provider#receiveSubscription(java.lang.String msisdn ,)java.lang.String serviceId ,)java.lang.String distributionList
	 * ,)javax.xml.datatype.XMLGregorianCalendar validTo )*
	 */
	public void receiveSubscription( java.lang.String msisdn, java.lang.String serviceId, java.lang.String distributionList, javax.xml.datatype.XMLGregorianCalendar validTo ) throws PolicyException_Exception,
			ServiceException_Exception {
		Date gregorianTime = validTo.toGregorianCalendar().getTime();
		communicator.receiveSubscription(msisdn, serviceId, distributionList, gregorianTime);
		
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.klikmee.sms.core.ws.mts.listener.subscription.Provider#receiveSubscriptionExtension(java.lang.String msisdn ,)java.lang.String serviceId ,)java.lang.String distributionList
	 * ,)javax.xml.datatype.XMLGregorianCalendar validTo )*
	 */
	public void receiveSubscriptionExtension( java.lang.String msisdn, java.lang.String serviceId, java.lang.String distributionList, javax.xml.datatype.XMLGregorianCalendar validTo )
			throws PolicyException_Exception, ServiceException_Exception {
		Date gregorianTime = validTo.toGregorianCalendar().getTime();
		communicator.receiveSubscriptionExtension(msisdn, serviceId, distributionList, gregorianTime);
	}

	public void setCommunicator( MTSCommunicator communicator ) {
		this.communicator = communicator;
	}
}
